<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>门店收入报表</title>
    <script src="/js/plugins/echarts/echarts.common.min.js"></script>
    <#include "/common/link.ftl" >

</head>
<body class="hold-transition skin-black sidebar-mini">
<div id="main" style="width: 900px;height:400px;"></div>
<script>
    var chartDom = document.getElementById('main');
    var myChart = echarts.init(chartDom);
    var option;
    option = {
        legend: {},
        tooltip: {},
        dataZoom: [
            {
                type: 'slider',
                show: true,
                start: 50,
                end: 100,
                handleSize: 30
            },
            {
                type: 'inside',
                start: 94,
                end: 100
            },
            {
                type: 'slider',
                show: true,
                yAxisIndex: 0,
                filterMode: 'empty',
                width: 12,
                height: '70%',
                handleSize: 8,
                showDataShadow: false,
                left: '93%'
            }
        ],
        dataset: {
            source: [
                ['分组类型', '总消费金额', '总实收金额', '总优惠金额'],
                <#list pageInfo.list as c>
                ['${c.groupByName}', ${c.totalAmount},${c.totalPayAmount}, ${c.totalDiscountAmount}]
                <#if c_index < pageInfo.list?size - 1>,</#if>
                </#list>
            ]
        },
        xAxis: {type: 'category'},
        yAxis: {},
        // Declare several bar series, each will be mapped
        // to a column of dataset.source by default.
        series: [
            {type: 'bar'},
            {type: 'bar'},
            {type: 'bar'}
        ]
    };
    option && myChart.setOption(option);
</script>
</body>
</html>